<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title>登录</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="stylesheet" href="/AmazeUI-2.4.2/assets/css/amazeui.css"/>
    <link href="/css/dlstyle.css" rel="stylesheet" type="text/css">
    <link type="text/css" href="/css/hmstyle.css" rel="stylesheet"/>
    <link href="/layui/css/layui.css" type="text/css" rel="stylesheet">
    <link type="text/css" href="/css/hmstyle.css" rel="stylesheet"/>
    <script type="text/javascript" src="/layui/layui.js"></script>
    <script src="/js/common.js" type="text/javascript"></script>
</head>

<body>

<div class="login-boxtitle">
    <a href="/"></a>
</div>

<div class="login-banner">

    <div class="login-main">

        <div class="login-banner-bg"><span></span><img src="images/big.jpg"/></div>
        <div class="login-box">

            <h3 class="title">登录江顺食品零售商城</h3>

            <div class="clear"></div>
            <form action="/login" method="post">
                <div class="login-form">

                    <div class="user-name">
                        <label for="user"><i class="am-icon-user"></i></label>
                        <input type="text" name="username" id="user" placeholder="邮箱/手机/用户名">
                    </div>
                    <div class="user-pass">
                        <label for="password"><i class="am-icon-lock"></i></label>
                        <input type="password" name="password" id="password" placeholder="请输入密码">
                    </div>

                </div>
                <!--                    <div class="login-links">-->
                <!--                        <label for="remember-me"><input id="remember-me" type="checkbox">记住密码</label>-->
                <!--                        <a href="#" class="am-fr">忘记密码</a>-->
                <!--                        <a href="register.html" class="zcnext am-fr am-btn-default">注册</a>-->
                <!--                        <br />-->
                <!--                    </div>-->
                <div class="am-cf">
                    <input type="submit" lay-filter="login" name="" value="登 录"
                           class="am-btn am-btn-primary am-btn-sm">
                    <!--                <button class="am-btn am-btn-primary am-btn-sm" lay-submit="" lay-filter="login">登 录</button>-->
                </div>
            </form>
            <div class="login-links">
                <label for="remember-me"><input id="remember-me" type="checkbox">记住密码</label>
                <a href="#" class="am-fr">忘记密码</a>
                <a href="/register/page" class="zcnext am-fr am-btn-default">注册</a>
                <br/>
            </div>
            <div class="partner">
                <h3>合作账号</h3>
                <div class="am-btn-group">
                    <li><a href="#"><i class="am-icon-qq am-icon-sm"></i><span>QQ登录</span></a></li>
                    <li><a href="#"><i class="am-icon-weibo am-icon-sm"></i><span>微博登录</span> </a></li>
                    <li><a href="#"><i class="am-icon-weixin am-icon-sm"></i><span>微信登录</span> </a></li>
                </div>
            </div>

        </div>
        <!--        </form>-->
    </div>
</div>


<th:block th:include="footer"/>


<script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
<script >
    layui.use(['form', 'table', 'layer', 'util'], function () {
        var form = layui.form
        layer = layui.layer;
        table = layui.table;
        $ = layui.jquery;
        util = layui.util;



        var errMsg = '[[${errMsg}]]';
        if(errMsg){
            layer.msg(errMsg);
        }

        // 登录过期的时候，跳出ifram框架
        if (top.location != self.location) top.location = self.location;


        // 进行登录操作
        form.on('submit(login)', function (data) {
            data = data.field;
            if (!data.username) {
                layer.msg('用户名不能为空');
                return false;
            }
            if (data.password == '') {
                layer.msg('密码不能为空');
                return false;
            }
            if (data.captcha == '') {
                layer.msg('验证码不能为空');
                return false;
            }

        });


    });

</script>
</body>

</html>